]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
boxpointer: Disable unredirection while visible
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 28 Jun 2021 09:57:05 +0000 (11:57 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 28 Jun 2021 10:07:12 +0000 (12:07 +0200)
Some popovers like the ibus candidate popover may be requested while
showing an unredirected fullscreen window. Disable unredirection
while the popover is visible so that it can actually be shown.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1900>

js/ui/boxpointer.js

index b8c2f09b654b094263fb77569a7c9de08ee7dd2a..c664ae748b105edae5829b989b1e5ad68447b0fb 100644 (file)
@@ -1,7 +1,7 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 /* exported BoxPointer */
 
-const { Clutter, GObject, St } = imports.gi;
+const { Clutter, GObject, Meta, St } = imports.gi;
 
 const Main = imports.ui.main;
 
@@ -48,6 +48,13 @@ var BoxPointer = GObject.registerClass({
         this._sourceAlignment = 0.5;
         this._muteInput = true;
 
+        this.connect('notify::visible', () => {
+            if (this.visible)
+                Meta.disable_unredirect_for_display(global.display);
+            else
+                Meta.enable_unredirect_for_display(global.display);
+        });
+
         this.connect('destroy', this._onDestroy.bind(this));
     }